home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / ksplash / objkstheme.h next >
Encoding:
C/C++ Source or Header  |  2005-09-10  |  2.4 KB  |  71 lines

  1. /***************************************************************************
  2.  *   Copyright Brian Ledbetter 2001-2003 <brian@shadowcom.net>             *
  3.  *   Copyright Ravikiran Rajagopal 2003 <ravi@kde.org>                     *
  4.  *                                                                         *
  5.  *   This program is free software; you can redistribute it and/or modify  *
  6.  *   it under the terms of the GNU General Public License (version 2) as   *
  7.  *   published by the Free Software Foundation. (The original KSplash/ML   *
  8.  *   codebase (upto version 0.95.3) is BSD-licensed.)                      *
  9.  *                                                                         *
  10.  ***************************************************************************/
  11.  
  12. #ifndef __OBJKSTHEME_H__
  13. #define __OBJKSTHEME_H__
  14.  
  15. #include <kcmdlineargs.h>
  16.  
  17. #include <qstring.h>
  18. #include <qstringlist.h>
  19.  
  20. class KConfig;
  21. /**
  22.  * @short Theme reader.
  23.  * A Theme is read in from the file
  24.  * <KDEDIR>/share/apps/ksplash/Themes/<theme>/Theme.rc
  25.  * This controls the behavior, graphics, and appearance
  26.  * of KSplash completely, and offers a friendlier way
  27.  * of installing custom splash screens.
  28.  */
  29. class KDE_EXPORT ObjKsTheme : public QObject
  30. {
  31.   Q_OBJECT
  32. public:
  33.   explicit ObjKsTheme( const QString& );
  34.   virtual ~ObjKsTheme();
  35.  
  36.   void loadCmdLineArgs( KCmdLineArgs * );
  37.  
  38.   QString theme() const      { return( mActiveTheme ); }
  39.   QString themeEngine() const { return( mThemeEngine ); }
  40.   KConfig *themeConfig() const { return( mThemeConfig ); }
  41.   QString themeDir() const   { return( mThemeDir );    }
  42.   bool loColor() const       { return( mLoColor );     }
  43.   bool testing() const       { return( mTesting );     }
  44.   bool managedMode() const   { return( mManagedMode ); }
  45.   QString icon( int i ) { return (m_icons[i-1].isNull()?(QString::null):m_icons[i-1]); }
  46.   QString text( int i ) { return (m_text[i-1].isNull()?(QString::null):m_text[i-1]);   }
  47.   QString locateThemeData( const QString &resource );
  48.   int xineramaScreen() const { return mXineramaScreen; }
  49.  
  50. protected:
  51.   bool loadThemeRc( const QString&, bool );
  52.   bool loadLocalConfig( const QString&, bool );
  53.   bool loadKConfig( KConfig *, const QString&, bool );
  54.  
  55. private:
  56.   QString mActiveTheme, mThemeDir;
  57.   KConfig *mThemeConfig;
  58.  
  59.   int mXineramaScreen;
  60.   bool mLoColor, mTesting, mManagedMode;
  61.   QString mThemeEngine;
  62.   QString mThemePrefix;
  63.  
  64.   QStringList m_icons, m_text;
  65.  
  66.   class ObjKsThemePrivate;
  67.   ObjKsThemePrivate *d;
  68. };
  69.  
  70. #endif
  71.